#ifndef BITSTREAM_H
#define BITSTREAM_H


struct bitstream
{
    unsigned char *pdata;
    unsigned int  length;
    unsigned int  pos_byte;
    unsigned char pos_bit;
};

void bitstream_init(struct bitstream *bst,unsigned char *pdata,unsigned int length);
unsigned char bitstream_read(struct bitstream *bst);
void bitstream_write(struct bitstream *bst,unsigned char value);




#endif
